package com.kaiwu.tc.persistence.session;


import com.kaiwu.tc.persistence.builder.xml.XMLConfigBuilder;

import java.io.InputStream;

/**
 * @author Captain
 * @date 2021/1/23
 **/
public class SqlSessionFactoryBuilder {

    public static SqlSessionFactory build(InputStream in) throws Exception {
        XMLConfigBuilder configBuilder = new XMLConfigBuilder();
        Configuration configuration = configBuilder.parse(in);
        return new DefaultSqlSessionFactory(configuration);
    }
}
